package leetcode_2401_2500;

import java.util.HashSet;
import java.util.Set;

public class LeeCode_2405 {
    public static void main(String[] args) {

    }
    private static int partitionString(String s) {
        Set<Character> set = new HashSet<>();
        int ans = 1;
        int n = s.length(), i = 0;
        while (i < n){
            char c = s.charAt(i);
            if (set.contains(c)){
                ans++;
                set.clear();
            }
            set.add(c);
            i++;
        }
        return ans;
    }
}